package org.dm.TestCase;

import org.testng.annotations.*;

public class TestNgTest {

    @Test
    public void getBaiDu(){
        System.out.println("这是一个testcase1");
    }

    @Test(enabled = false)
    public void test2(){
        System.out.println("这是一个testcase2");
    }

    @Test(groups = "abcdTest")
    public void testGroups(){
        System.out.println("这是一个groups");
    }

    @BeforeSuite(alwaysRun=true)
    public void BeforeSuite(){
        System.out.println("BeforeSuite");
    }

    @BeforeTest(alwaysRun = true)
    public void BeforeTest(){
        System.out.println("BeforeTest");
    }

    @BeforeClass(alwaysRun = true)
    public void BeforeClass(){
        System.out.println("BeforeClass");
    }

    @BeforeGroups("abcdTest")
    public void BeforeGroups(){
        System.out.println("BeforeGroups");
    }

    @BeforeMethod(alwaysRun = true)
    public void BeforeMethod1(){
        System.out.println("BeforeMethod");
    }

    @AfterMethod(alwaysRun = true)
    public void AfterMethod(){
        System.out.println("AfterMethod");
    }

    @AfterGroups("abcdTest")
    public void AfterGroups(){
        System.out.println("AfterGroups");
    }

    @AfterClass(alwaysRun = true)
    public void AfterClass(){
        System.out.println("AfterClass");
    }

    @AfterTest(alwaysRun = true)
    public void AfterTest(){
        System.out.println("AfterTest");
    }

    @AfterSuite(alwaysRun = true)
    public void AfterSuite(){
        System.out.println("AfterSuite");
    }
}
